#include "stdafx.h"
#include"Peer.h"

Peer::Peer()
{
}

Peer::Peer(UInt32 socket_id)
{
	m_nSocketId = socket_id;
}

Peer::~Peer()
{

}
void Peer::SendData(const void* pData,size_t nDataLen)
{
	static ISocketServer* pSocketServer = singleton<ServerCallbackData>::instance().GetSocketServer();
	void   *p = const_cast<void*>(pData);
	pSocketServer->SendData(m_nSocketId,(char*)p+sizeof(UInt32),nDataLen-sizeof(UInt32));
	//pSocketServer->SendData(m_nSocketId,(char*)p,nDataLen);
}